<?php
if (isset($_GET['id']))
	U1_DAO_Message::delete($player->getId(), $_GET['id']);

echo '<h1>Message</h1>';

foreach (U1_DAO_Message::select($player->getId(), null) as $message)
	echo '<article><header><h2>'.$message->sujet.'</h2><p>Rreçut le <time pubdate="pubdate">'.$message->date.'</time></p></header><section><p>'.$message->message.'</p></section><footer><p><a href="?id[]='.$message->id.'">Supprimer le message</a></p></footer></article>';